<!DOCTYPE html>
<html>
  <head>
    <title>Drawshield3 Blazon Analysis</title>
    <script language="javascript">
    function showhelp(area,button,label) { 
      var helparea = document.getElementById(area);
      var helpbutton = document.getElementById(button);
      if ( helparea.style.display == 'none' ) {
        helpbutton.value = 'Hide Help';
        helparea.style.display = 'block';
      } else {
        helparea.style.display = 'none';
        helpbutton.value = label;
      }
    }
    </script>
  </head>
  <body>
    <h1>Drawshield3 Blazon Analysis Test Page</h1>
    <form name="analyse" action="" method="GET">
      <table>
        <tr>
          <td><h2>Enter blazon:</h2></td>
          <td><input id="blazonbutton" type="button" value="Blazon Help" onclick="showhelp('blazonarea','blazonbutton','Blazon Help')"/>
        </tr>
      </table>
      <div id="blazonarea" style="display:none;">
      <p style="width:600px;">Drawshield3 should be able to recognise all of the terms in the glossary of <strong>Boutell's Heraldry</strong>. However,
      if you do have problems you can force Drawshield3 to recognise an unknown word as a particular kind of term.
      Most commonly, Drawshield3 will be unable to recognise modern or esoteric charges, but surrounding the charge with
      curly braces will cause it to be recognised as a charge. For example <em>"a {builder's trowel} or"</em>. This mechanism 
      can be extended to recognise other things, for example to force recognition of a new division type, use
      <em>"{division: per hexagon} azure and or"</em>. You can use the same technique for things such as <em>{linetype: },
      {chargefeat: }, {chargemod: }</em> and so on. The difference between a charge feature and a charge modifier
      is that a feature might be followed by a tincture, whereas a modifier just changes some aspect of the charge.
      </p>
      </div>
      <textarea name="blazon" rows="5" cols="50"><?php if (isset($_GET['blazon'])) echo $_GET['blazon'];?></textarea>
      <table>
        <tr>
          <td><h2>Choose Options</h2></td>
          <td><input id="optionbutton" type="button" value="Options Help" onclick="showhelp('optionarea','optionbutton','Options Help')"/>
        </tr>
      </table>
      <div id="optionarea" style="display:none;">
      <p style="width:600px;">.
      </p>
      </div>
      <p>Display blazon structure as: 
        <select name="format">
          <option selected="selected" value="text-c">Text - compact</option>
          <option value="text-s">Text - spaced</option>
          <option value="xml-f">XML - formatted</option>
        </select>
      </p>
      <table>
        <tr>
          <td>
            <ul>
              <li><input type="checkbox" name="syntax" value="true" disabled="disabled" checked="checked">Check syntax and spelling</li>
                <li><input type="checkbox" name="complex" value="true">Report complexity</li>
                  </ul>
                </td>
                <td>
                  <ul>
                  <li><input type="checkbox" name="tokens" value="true">Show input words</li>
                      <li><input type="checkbox" name="obsolete" value="true">Check for obsolete terms</li>
                    </ul>
                  </td>
                </tr>
              </table>
              <input type="submit" name="submit" value="Analyse" />
            </form>
            <?php include "analyse.php"; ?>
          </body>
        </html>

